import Vue from 'vue'

import 'normalize.css/normalize.css' // A modern alternative to CSS resets

import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'

import '@/styles/index.scss' // global css

import App from './App'
import store from './store'
import router from './router'

import '@/icons' // icon
import '@/permission' // permission control

/**
 * This project originally used easy-mock to simulate data,
 * but its official service is very unstable,
 * and you can build your own service if you need it.
 * So here I use Mock.js for local emulation,
 * it will intercept your request, so you won't see the request in the network.
 * If you remove `../mock` it will automatically request easy-mock data.
 */
import '../mock' // simulation data

import common from '@/utils/common'
//自定义组件
import UploadImgs from "@/components/upload-imgs";
import CompReply from '@/components/CompReply'
import CompReplyEdit from '@/components/CompReplyEdit'
import CompImg from '@/components/CompImg'

Vue.prototype.g_cc = common;

//page
// Vue.prototype.p_page_base = new PageBase();
// Vue.prototype.g_page = new Page();

Vue.use(ElementUI)
Vue.component('x-upload-imgs', UploadImgs)
Vue.component('CompImg', CompImg)
Vue.component('CompReply', CompReply)
Vue.component('CompReplyEdit', CompReplyEdit)

Vue.config.productionTip = false

new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
})
